<%@ page language="java" pageEncoding="UTF-8"%><!DOCTYPE html>
<html><%@ taglib uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<head>
<title></title>
<jsp:include page="/admin/head.jsp" />
</head>
<body>
	<jsp:include page="/admin/header.jsp" />
	<jsp:include page="/admin/left-menu.jsp"><jsp:param
			value="1" name="index" /></jsp:include>
	<jsp:include page="/admin/footer.jsp" />


	<!--中间-->
	<section>
		<nav aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item">管理首页</li>
				<li class="breadcrumb-item">内容管理</li>
				<li class="breadcrumb-item active">新闻中心</li>
			</ol>
		</nav>

		<form class="form-inline" action="admin/user-list-3.let" method="get">
			<div class="form-group mx-sm-1 mb-2">
				<label class="sr-only">角色：</label> <select name="roleId"
					class="form-control">
					<option value="">全部</option>

				</select>

			</div>
			<div class="form-group mx-sm-1 mb-2">
				<label class="sr-only">关键字：</label> <input name="key" type="text"
					class="form-control" value="${search.key}" placeholder="搜索关键字">
			</div>
			<button type="submit" class="btn btn-primary mb-2">
				<i class="fa fa-search"></i>
			</button>
			<a href="admin/user-add-form.jsp"
				class="btn btn-success ml-auto mr-2"><i class="fa fa-plus"></i></a>
			<div class="form-group mx-sm-1 mb-2">
				<label class="sr-only">数量：</label> <select name="pageSize"
					class="form-control">
					<c:forEach begin="5" end="50" step="5" var="i">
						<option value="${i }"
							<c:if test="${i==p.rowMax }"> selected="selected"</c:if>>每页${i }条</option>
					</c:forEach>
				</select>
			</div>
		</form>
		<div class="ml-2 mr-2">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th scope="col">#</th>
						<th scope="col">帐号</th>
						<th scope="col">昵称</th>
						<th scope="col">角色</th>
						<th scope="col">性别</th>
						<th scope="col">电话号码</th>
						<th scope="col">出生日期</th>
						<th scope="col">注册时间</th>
						<th scope="col">锁定</th>
						<th scope="col">操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${p.list }" var="vo" varStatus="i">
						<tr>
							<th scope="row">${i.count }</th>
							<td>${vo.userName }</td>
							<td>${vo.userNickname }</td>
							<td>${vo.roleName }</td>
							<td>${vo.userSex?"男":"女" }</td>
							<td>${vo.userPhone }</td>
							<td>${t.formatDate(vo.userBrithdate,"yy年MM月dd日") }</td>
							<td>${t.formatDate(vo.createTime,"yyyy-MM-dd HH:mm") }</td>
							<td><input class="switch" type="checkbox"
								${vo.userStatus==1?' checked="checked"':''} /></td>
							<td class="p-1"><div class="dropdown">
									<button
										class="btn btn-outline-primary btn-block dropdown-toggle"
										type="button" data-toggle="dropdown">操作</button>
									<div class="dropdown-menu dropdown-menu-right">
										<a class="dropdown-item"
											href="admin/user-look.let?userId=${vo.userId}">查看</a> <a
											class="dropdown-item"
											href="admin/user-update-form.let?userId=${vo.userId}">修改</a>
										<a class="dropdown-item _delete"
											href="admin/user-delete.let?userId=${vo.userId}">删除</a>
									</div>
								</div></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>

			${t.page(p,5,t.concat("admin/user-list-3.let?roleId=",search.roleId,"&key=",search.key,"&pageSize=",p.rowMax,"&pageNumber={page}")) }



		</div>
	</section>


</body>
</html>
